package com.fancy.learncenter.ui.view;

import android.app.Activity;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.fancy.learncenter.R;
import com.fancy.learncenter.common.MyApplication;
import com.fancy.learncenter.ui.activity.base.BaseActivity;

/**
 * Created by Hyy on 2017/2/24.
 */

public class RequestPopupWindow extends BasePopupWindow {
    public RequestPopupWindow(Activity mContext) {
        super(mContext);

        initPopup();
    }

    View popopView;

    private void initPopup() {
        popopView = LayoutInflater.from(MyApplication.context).inflate(R.layout.dlg_request, null);

        setWidth(ViewGroup.LayoutParams.MATCH_PARENT);
        setHeight(ViewGroup.LayoutParams.MATCH_PARENT);

        setOutsideTouchable(false);

        setContentView(popopView);
    }

    @Override
    public void showPopupWindow() {
        super.showPopupWindow();

        showAtLocation(popopView, Gravity.CENTER, 0, 0);
    }
}
